<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
     protected function _initDoctype(){
         $view = new Zend_View($this->getOptions());
         $view->doctype('XHTML1_STRICT');
         $view->headTitle()->setSeparator(' - ')->append('Ćwiczenie-10');
         $view->headMeta()->appendHttpEquiv('Content-Type','text/html; charset=utf-8');
         Zend_Registry::set('gosc', 'tak');
         return $view;
     
    }
    
    public function _initDbNames(){
         try {
                 if ($this->hasPluginResource('db')){
                         $db = $this->getPluginResource('db');
                         $db->getDbAdapter()->query('SET NAMES UTF8');
                 }
         }catch (Exception $e) {
              echo "Blad polaczenia z baza danych: ".$e->getMessage() . PHP_EOL;
              exit(0);
         }
    }

}
